package org.jshand.jxc.business.component;

import java.awt.FlowLayout;
import java.awt.Image;
import java.awt.Label;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class JComponentPanel extends JPanel {

	public JComponentPanel() {
		super();
		FlowLayout layout = new FlowLayout();
		layout.setAlignment(FlowLayout.LEFT);
		this.setLayout(layout);
		JLabel l = new JLabel("我是一个Label");
		l.setLocation(0, 0);
		this.add( l);
		this.add(new JButton("我是一个JButton") );
		
		Image im = null;;
//		try {
//			im = ImageIO.read(this.getClass().getResource("/add.gif"));
//		} catch (IOException e) {
//			e.printStackTrace();
//		}
//		
//		this.add(new JButton(new ImageIcon(im)) );
		this.add(new JButton(new ImageIcon("images/1506234791291.gif")) );
		this.add(new JCheckBox("我是一个CheckBox") );
		this.add(new JCheckBox("默认选中的CheckBox",true) );
		
		
		this.add( new Label("                      "));
		
		
		this.add(new JCheckBox("默认选中的CheckBox",true) );
		this.add(new JCheckBox("默认选中的CheckBox",true) );
		
	}
	
	
}
